﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml;
using System.Xml.XPath;
using System.Collections.Generic;

namespace EpiMapit.Web
{
    public class KmlParser
    {
        public KmlParser()
        {
            
        }

        public static void ExtractDatesAndDistances(XmlDocument doc, out DateTime[] dates, out float[] distances)
        {
            dates = null;
            distances = null;

            XPathNavigator nav;
            XPathNodeIterator nodeIter;

            string strSelection = "kml";
            nav = doc.CreateNavigator();
            nodeIter = nav.Select(strSelection);

            List<DateTime> resultDates = new List<DateTime>();
            List<float> resultDistances = new List<float>();

            while (nodeIter.MoveNext())
            {
                var splitted = nodeIter.Current.Value.Split(" Km on ".ToCharArray());
                continue;
            }
        }
    }
}
